﻿<?xml version="1.0" encoding="utf-8"?>
<xs:schema id="invoicehistory" targetNamespace="http://tempuri.org/invoicehistory.xsd" xmlns:mstns="http://tempuri.org/invoicehistory.xsd" xmlns="http://tempuri.org/invoicehistory.xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:msprop="urn:schemas-microsoft-com:xml-msprop" attributeFormDefault="qualified" elementFormDefault="qualified">
  <xs:annotation>
    <xs:appinfo source="urn:schemas-microsoft-com:xml-msdatasource">
      <DataSource DefaultConnectionIndex="0" FunctionsComponentName="QueriesTableAdapter" Modifier="AutoLayout, AnsiClass, Class, Public" SchemaSerializationMode="IncludeSchema" xmlns="urn:schemas-microsoft-com:xml-msdatasource">
        <Connections>
          <Connection AppSettingsObjectName="Settings" AppSettingsPropertyName="tailoringmngConnectionString" ConnectionStringObject="" IsAppSettingsProperty="true" Modifier="Assembly" Name="tailoringmngConnectionString (Settings)" ParameterPrefix="@" PropertyReference="ApplicationSettings.Tailoring.Properties.Settings.GlobalReference.Default.tailoringmngConnectionString" Provider="System.Data.SqlClient" />
        </Connections>
        <Tables>
          <TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="invoicehistoryTableAdapter" GeneratorDataComponentClassName="invoicehistoryTableAdapter" Name="invoicehistory" UserDataComponentName="invoicehistoryTableAdapter">
            <MainSource>
              <DbSource ConnectionRef="tailoringmngConnectionString (Settings)" DbObjectType="Unknown" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="false" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="false" UserGetMethodName="GetData" UserSourceName="Fill">
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="true">
                    <CommandText>SELECT        tblinvoice.invoiceId, tblinvoice.orderId, tblinvoice.ClientId, tblinvoice.TransDate, tblaccount.amountRece, tblaccount.amountBal, tblaccount.totalAmount
FROM            tblinvoice INNER JOIN
                         tblaccount ON tblinvoice.ClientId = tblaccount.clientId
ORDER BY tblaccount.amountRece DESC</CommandText>
                    <Parameters />
                  </DbCommand>
                </SelectCommand>
              </DbSource>
            </MainSource>
            <Mappings>
              <Mapping SourceColumn="invoiceId" DataSetColumn="invoiceId" />
              <Mapping SourceColumn="orderId" DataSetColumn="orderId" />
              <Mapping SourceColumn="ClientId" DataSetColumn="ClientId" />
              <Mapping SourceColumn="TransDate" DataSetColumn="TransDate" />
              <Mapping SourceColumn="amountRece" DataSetColumn="amountRece" />
              <Mapping SourceColumn="amountBal" DataSetColumn="amountBal" />
              <Mapping SourceColumn="totalAmount" DataSetColumn="totalAmount" />
            </Mappings>
            <Sources />
          </TableAdapter>
        </Tables>
        <Sources />
      </DataSource>
    </xs:appinfo>
  </xs:annotation>
  <xs:element name="invoicehistory" msdata:IsDataSet="true" msdata:UseCurrentLocale="true" msprop:EnableTableAdapterManager="True" msprop:Generator_DataSetName="invoicehistory" msprop:Generator_UserDSName="invoicehistory">
    <xs:complexType>
      <xs:choice minOccurs="0" maxOccurs="unbounded">
        <xs:element name="invoicehistory" msprop:Generator_TableClassName="invoicehistoryDataTable" msprop:Generator_TableVarName="tableinvoicehistory" msprop:Generator_TablePropName="_invoicehistory" msprop:Generator_RowDeletingName="invoicehistoryRowDeleting" msprop:Generator_RowChangingName="invoicehistoryRowChanging" msprop:Generator_RowEvHandlerName="invoicehistoryRowChangeEventHandler" msprop:Generator_RowDeletedName="invoicehistoryRowDeleted" msprop:Generator_UserTableName="invoicehistory" msprop:Generator_RowChangedName="invoicehistoryRowChanged" msprop:Generator_RowEvArgName="invoicehistoryRowChangeEvent" msprop:Generator_RowClassName="invoicehistoryRow">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="invoiceId" msprop:Generator_ColumnVarNameInTable="columninvoiceId" msprop:Generator_ColumnPropNameInRow="invoiceId" msprop:Generator_ColumnPropNameInTable="invoiceIdColumn" msprop:Generator_UserColumnName="invoiceId" type="xs:int" />
              <xs:element name="orderId" msprop:Generator_ColumnVarNameInTable="columnorderId" msprop:Generator_ColumnPropNameInRow="orderId" msprop:Generator_ColumnPropNameInTable="orderIdColumn" msprop:Generator_UserColumnName="orderId" type="xs:int" />
              <xs:element name="ClientId" msprop:Generator_ColumnVarNameInTable="columnClientId" msprop:Generator_ColumnPropNameInRow="ClientId" msprop:Generator_ColumnPropNameInTable="ClientIdColumn" msprop:Generator_UserColumnName="ClientId" type="xs:int" />
              <xs:element name="TransDate" msprop:Generator_ColumnVarNameInTable="columnTransDate" msprop:Generator_ColumnPropNameInRow="TransDate" msprop:Generator_ColumnPropNameInTable="TransDateColumn" msprop:Generator_UserColumnName="TransDate" type="xs:dateTime" minOccurs="0" />
              <xs:element name="amountRece" msprop:Generator_ColumnVarNameInTable="columnamountRece" msprop:Generator_ColumnPropNameInRow="amountRece" msprop:Generator_ColumnPropNameInTable="amountReceColumn" msprop:Generator_UserColumnName="amountRece" type="xs:int" minOccurs="0" />
              <xs:element name="amountBal" msprop:Generator_ColumnVarNameInTable="columnamountBal" msprop:Generator_ColumnPropNameInRow="amountBal" msprop:Generator_ColumnPropNameInTable="amountBalColumn" msprop:Generator_UserColumnName="amountBal" type="xs:int" minOccurs="0" />
              <xs:element name="totalAmount" msprop:Generator_ColumnVarNameInTable="columntotalAmount" msprop:Generator_ColumnPropNameInRow="totalAmount" msprop:Generator_ColumnPropNameInTable="totalAmountColumn" msprop:Generator_UserColumnName="totalAmount" type="xs:int" minOccurs="0" />
            </xs:sequence>
          </xs:complexType>
        </xs:element>
      </xs:choice>
    </xs:complexType>
    <xs:unique name="Constraint1" msdata:PrimaryKey="true">
      <xs:selector xpath=".//mstns:invoicehistory" />
      <xs:field xpath="mstns:invoiceId" />
    </xs:unique>
  </xs:element>
</xs:schema>